
class Person {
    constructor(name, age) {
        this.name = name
        this.age = age
    }

    infoAction() {
        console.log(this.name + ' ' + this.age); 
    }
}

let zhangSanPerson = new Person('张三','18')
zhangSanPerson.infoAction()
/** 
class Student {
    constructor(name, age, score) {
        this.name = name
        this.age = age
        this.score = score
    }

    infoAction() {
        console.log(this.name + ' ' + this.age); 
    }

    studying() {
        console.log(this.name, this.age, this.score, "studing");
    }
}
*/

class Student extends Person {
    constructor(name, age, score) {
        super(name,age)
        this.score = score
    }

    studying() {
        console.log(this.name, this.age, this.score, "studing");
    }
}

let oneStudent = new Student('李四','18','100')
oneStudent.studying()